package pubM

import (
	"db2s/go-log/log"
)

type WLogEr interface {
	Debug(str string)
	Info(str string)
	Warn(str string)
	Error(str string)
}
type MainLog struct {
	LogFile  string
	LogPoint *log.Logger
}

func NewWLogEr(s any) WLogEr {
	switch s.(type) {
	case MainLog:
		return MainLog{}
	}
	return nil
}
func (m MainLog) Init() {

}
func (m MainLog) Debug(str string) {
	if m.LogPoint != nil {
		m.LogPoint.Debug(str)
	}
}
func (m MainLog) Info(str string) {
	if m.LogPoint != nil {
		m.LogPoint.Info(str)
	}
}
func (m MainLog) Warn(str string) {
	if m.LogPoint != nil {
		m.LogPoint.Warn(str)
	}
}
func (m MainLog) Error(str string) {
	if m.LogPoint != nil {
		m.LogPoint.Error(str)
	}
}
